<template>
    <example :template-code="templateString">
        <template #describe>
            <t :id="`${$t('离散值')}`">{{ $t('离散值') }}</t>
        </template>
        <div style="width:300px;">
            <sib-item v-model="value1" :props="props1"></sib-item>
            <sib-item v-model="value2" :props="props2"></sib-item>
        </div>
    </example>
</template>

<script>
import { ref, reactive } from 'vue';

export default {
    setup() {
        const value1 = ref(50);
        const props1 = reactive({
            type: 'slider',
            step: 10,
        });

        const value2 = ref(10);
        const props2 = reactive({
            type: 'slider',
            step: 10,
            showStops: true,
        });

        return {
            props1,
            value1,
            props2,
            value2,
            templateString: `<template>
    <sib-item v-model="value1" :props="props1"></sib-item>
    <sib-item v-model="value2" :props="props2"></sib-item>
</template>

<script>
import { ref, reactive } from 'vue';

export default {
    setup() {
        const value1 = ref(50);
        const props1 = reactive({
            type: 'slider',
            step: 10,
        });

        const value2 = ref(10);
        const props2 = reactive({
            type: 'slider',
            step: 10,
            showStops: true,
        });

        return { props1, props2, value1, value2 };
    },
};
<\/script>`,
        };
    },
};
</script>
